//
//  LKDefineFile.h
//  YLHelper
//
//  Created by she1323 on 2018/4/12.
//  Copyright © 2018年 she1323. All rights reserved.
//

#import <Foundation/Foundation.h>



#define WIDTH [UIScreen mainScreen].bounds.size.width

#define HEIGHT [UIScreen mainScreen].bounds.size.height



#define WS(weakSelf)  __weak typeof(self) weakSelf = self;

#define SS(strongSelf)  __strong __typeof(self) strongSelf = weakSelf;


#define ColorRGBA(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
#define ColorRGB(r,g,b) ColorRGBA(r,g,b,1.0f)


#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]/// rgb颜色转换（16进制->10进制）

#define COLOR_HEX(_hex)         [UIColor colorWithRed:((float)((_hex & 0xFF0000) >> 16)) / 255.0 \
green:((float)((_hex & 0xFF00)>> 8)) / 255.0 \
blue:((float) (_hex & 0xFF)) / 255.0 alpha:1.0f]


// 判断是否是iPhone X
#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? (CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) || CGSizeEqualToSize(CGSizeMake(750, 1624), [[UIScreen mainScreen] currentMode].size) || CGSizeEqualToSize(CGSizeMake(828, 1792), [[UIScreen mainScreen] currentMode].size) || CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size)) : NO)



#define requestSignValue  @"AC3555F2FBFDA64D0E505FEBE2974D64"

//#define iPhoneXMAX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2688), [[UIScreen mainScreen] currentMode].size) : NO)


//#define iPhoneX ([UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPhone] ? YES : NO);

//UIDevice.currentDevice.userInterfaceIdiom != UIUserInterfaceIdiomPhone

// 状态栏高度
#define STATUS_BAR_HEIGHT (iPhoneX ? 44.f : 20.f)
// 导航栏高度
#define NAVIGATION_BAR_HEIGHT (iPhoneX ? 88.f : 64.f)

// tabBar高度
#define TAB_BAR_HEIGHT (iPhoneX ? (49.f+34.f) : 49.f)
// home indicator
#define HOME_INDICATOR_HEIGHT (iPhoneX ? 34.f : 0.f)


//表单的默认统一高度
#define RowHeightDefault    52

//弧度转角度
#define RADIANS_TO_DEGREES(radians) ((radians) * (180.0 / M_PI))
//角度转弧度
#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI)

//tableviewcell的header的头部颜色
#define viewDefualtColor COLOR_HEX(0xF5F5F5)
#define labelBlackColor  COLOR_HEX(0x333333)
#define yellowDefaultColor COLOR_HEX(0xF39910)
#define blueDefault COLOR_HEX(0x4A78E8)









//获取项目相关信息
/** 程序版本号 */

#define APP_VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
/** 获取APP build版本 */

#define APP_BUILD ([[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"])


